﻿namespace H2.Streams.Sections
{
    using H2.Streams;
    using System;

    public class UnicodeCollection
    {
        private UnicodeInfo __chinese__;
        private UnicodeInfo __dutch__;
        private UnicodeInfo __english__;
        private UnicodeInfo __french__;
        private UnicodeInfo __italian__;
        private UnicodeInfo __japanese__;
        private UnicodeInfo __korean__;
        private UnicodeInfo __portuguese__;
        private UnicodeInfo __spanish__;
        private int GlobalsOffset;
        private MapStream Map;

        internal UnicodeCollection(MapStream map)
        {
            this.Map = map;
            this.GlobalsOffset = this.Map.Tags[this.Map.Index.GlobalsID, Tags.SearchType.ID].Offset;
            this.English = new UnicodeInfo(map, this.GlobalsOffset + 400);
            this.Japanese = new UnicodeInfo(map, this.GlobalsOffset + 0x1ac);
            this.Dutch = new UnicodeInfo(map, this.GlobalsOffset + 0x1c8);
            this.French = new UnicodeInfo(map, this.GlobalsOffset + 0x1e4);
            this.Spanish = new UnicodeInfo(map, this.GlobalsOffset + 0x200);
            this.Italian = new UnicodeInfo(map, this.GlobalsOffset + 540);
            this.Korean = new UnicodeInfo(map, this.GlobalsOffset + 0x238);
            this.Chinese = new UnicodeInfo(map, this.GlobalsOffset + 0x254);
            this.Portuguese = new UnicodeInfo(map, this.GlobalsOffset + 0x270);
        }

        public UnicodeInfo Chinese
        {
            get
            {
                return this.__chinese__;
            }
            set
            {
                this.__chinese__ = value;
            }
        }

        public UnicodeInfo Dutch
        {
            get
            {
                return this.__dutch__;
            }
            set
            {
                this.__dutch__ = value;
            }
        }

        public UnicodeInfo English
        {
            get
            {
                return this.__english__;
            }
            set
            {
                this.__english__ = value;
            }
        }

        public UnicodeInfo French
        {
            get
            {
                return this.__french__;
            }
            set
            {
                this.__french__ = value;
            }
        }

        public UnicodeInfo Italian
        {
            get
            {
                return this.__italian__;
            }
            set
            {
                this.__italian__ = value;
            }
        }

        public UnicodeInfo Japanese
        {
            get
            {
                return this.__japanese__;
            }
            set
            {
                this.__japanese__ = value;
            }
        }

        public UnicodeInfo Korean
        {
            get
            {
                return this.__korean__;
            }
            set
            {
                this.__korean__ = value;
            }
        }

        public UnicodeInfo Portuguese
        {
            get
            {
                return this.__portuguese__;
            }
            set
            {
                this.__portuguese__ = value;
            }
        }

        public UnicodeInfo Spanish
        {
            get
            {
                return this.__spanish__;
            }
            set
            {
                this.__spanish__ = value;
            }
        }
    }
}

